<?php

require_once(WSB_MODULES_PATH . 'sherpa/models/CategoryGateway.php');

class Sherpa_CategoryLevelOneBoxController extends WSB_Xtension_Extension
{

	/**
	 * @return string
	 */
	public function renderForBackend()
	{
		return get_class($this);
	}

	/**
	 * Index Action
	 */
	public function indexAction()
	{
		$languageId = $this->getLanguageId();
		$gateway = new Sherpa_Model_CategoryGateway();
		$categories = $gateway->fetchLevelOneItems($languageId);
		$this->_view->categories = $categories;
		$this->_view->catId = $this->getParam('catId', 0);
		$this->addContent($this->_view->render('categorylevelonebox/index.phtml'));
	}

}